/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#include "../import/head.h"
#include "../data_struct/pool.h"
#include "../tools/head.h"
#include "head.h"
#include "hook.h"

namespace xos_xml
{

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 

    hook::hook()
    {
    }

    hook::~hook()
    {
    }

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 

    int hook::init()
    {
        int ret = 0;

        if( 0 == ret )
        {
            ret = pool::init();
        }		
        
        if( 0 == ret )
        {
            ret = node_impl::init_all();
        }

        if( 0 == ret )
        {
            ret = doc_impl::init_all();
        }


        return ret;
    }

    int hook::term()
    {
        int ret = 0;

        doc_impl::term_all();
        node_impl::term_all();
        pool::term();

        return ret;
    }

} // xos_xml
